
use "$input/yu_ash_ready", clear


* use data after 1965
keep if year >= 1965

eststo clear

// effect on number of cases
eststo: reghdfe numops_log   polar_start if rule_P, absorb(stateyear i.statefe#c.x_year_start x_decade_start) cluster(state year)
outreg2 using "$output/tables/tab3",  replace se excel alpha(0.01, 0.05, 0.1) symbol(**, *, +) addtext(Court-year FE, X, Cohort FE, X, StatexStart-year,X) addstat(Adjusted R-squared,  e(r2_a)) nocons nor2 nonotes

// effect on number of words
eststo: reghdfe txt_words_log  polar_start if rule_P, absorb(stateyear i.statefe#c.x_year_start x_decade_start) cluster(state year)
outreg2 using "$output/tables/tab3",  append se excel  alpha(0.01, 0.05, 0.1) symbol(**, *, +) addtext(Court-year FE, X, Cohort FE, X, StatexStart-year,X) addstat(Adjusted R-squared,  e(r2_a)) nocons nor2 nonotes

// effect on number of cites
eststo: reghdfe cites_pos_log  polar_start if rule_P, absorb(stateyear i.statefe#c.x_year_start x_decade_start) cluster(state year)
outreg2 using "$output/tables/tab3",  append se excel  alpha(0.01, 0.05, 0.1) symbol(**, *, +) addtext(Court-year FE, X, Cohort FE, X, StatexStart-year,X) addstat(Adjusted R-squared,  e(r2_a)) nocons nor2 nonotes

// effects by cite types: all
eststo: reghdfe cites_all_m_log   polar_start if rule_P, absorb(stateyear i.statefe#c.x_year_start x_decade_start) cluster(state year)
outreg2 using "$output/tables/tab3",  append se excel alpha(0.01, 0.05, 0.1) symbol(**, *, +) addtext(Court-year FE, X, Cohort FE, X, StatexStart-year,X) addstat(Adjusted R-squared,  e(r2_a)) nocons nor2 nonotes

// effects by cite types: discussion
eststo: reghdfe cites_discuss_m_log   polar_start if rule_P, absorb(stateyear i.statefe#c.x_year_start x_decade_start) cluster(state year)
outreg2 using "$output/tables/tab3",  append se excel alpha(0.01, 0.05, 0.1) symbol(**, *, +) addtext(Court-year FE, X, Cohort FE, X, StatexStart-year,X) addstat(Adjusted R-squared,  e(r2_a)) nocons nor2 nonotes

// effects by cite types: quote
eststo: reghdfe cites_quote_m_log   polar_start if rule_P, absorb(stateyear i.statefe#c.x_year_start x_decade_start) cluster(state year)
outreg2 using "$output/tables/tab3",  append se excel alpha(0.01, 0.05, 0.1) symbol(**, *, +) addtext(Court-year FE, X, Cohort FE, X, StatexStart-year,X) addstat(Adjusted R-squared,  e(r2_a)) nocons nor2 nonotes


// effects by cite types: outstate
eststo: reghdfe cites_outstate_m_log   polar_start if rule_P, absorb(stateyear i.statefe#c.x_year_start x_decade_start) cluster(state year)
outreg2 using "$output/tables/tab3",  append se excel alpha(0.01, 0.05, 0.1) symbol(**, *, +) addtext(Court-year FE, X, Cohort FE, X, StatexStart-year,X) addstat(Adjusted R-squared,  e(r2_a)) nocons nor2 nonotes
